package com.finace.money.data.bean;

import com.finace.money.common.util.StringUtil;

/**
 * Created by zhangpeng on 2018/1/4.
 */

public class QryPositionBean extends BaseEntity{


    /**
     * Position : {"symbol":"rb1805","multiple":10,"close_point":71,"position":0,"avg_price":0,"side":true,"open_volume":3,"close_volume":3,"direction_type":"","position_cost":0,"unrealized_point":0,"commission":22.83,"today_position":0,"yd_position":0,"open_cost":0,"margin":0}
     * is_last : true
     * rsp_info : {"error_id":0,"error_message":""}
     */

    private PositionBean Position;
    private boolean is_last;
    private RspInfoBean rsp_info;

    public PositionBean getPosition() {
        return Position;
    }

    public void setPosition(PositionBean Position) {
        this.Position = Position;
    }

    public boolean isIs_last() {
        return is_last;
    }

    public void setIs_last(boolean is_last) {
        this.is_last = is_last;
    }

    public RspInfoBean getRsp_info() {
        return rsp_info;
    }

    public void setRsp_info(RspInfoBean rsp_info) {
        this.rsp_info = rsp_info;
    }

    public static class PositionBean extends BaseEntity {
        /**
         * symbol : rb1805
         * multiple : 10
         * close_point : 71.0
         * position : 0
         * avg_price : 0.0
         * side : true
         * open_volume : 3
         * close_volume : 3
         * direction_type :
         * position_cost : 0.0
         * unrealized_point : 0
         * commission : 22.83
         * today_position : 0
         * yd_position : 0
         * open_cost : 0.0
         * margin : 0.0
         */

        private String symbol;
        private int multiple;
        private double close_point;
        private int position;
        private double avg_price;
        private boolean side;
        private int open_volume;
        private int close_volume;
        private String direction_type;
        private double position_cost;
        private int unrealized_point;
        private double commission;
        private int today_position;
        private int yd_position;
        private double open_cost;
        private double margin;

        public String getSymbol() {
            return symbol;
        }

        public void setSymbol(String symbol) {
            this.symbol = symbol;
        }

        public int getMultiple() {
            return multiple;
        }

        public void setMultiple(int multiple) {
            this.multiple = multiple;
        }

        public double getClose_point() {
            return close_point;
        }

        public void setClose_point(double close_point) {
            this.close_point = close_point;
        }

        public int getPosition() {
            return position;
        }

        public void setPosition(int position) {
            this.position = position;
        }

        public double getAvg_price() {
            return Double.valueOf(StringUtil.getDecimal(avg_price));
        }

        public void setAvg_price(double avg_price) {
            this.avg_price = avg_price;
        }

        public boolean isSide() {
            return side;
        }

        public void setSide(boolean side) {
            this.side = side;
        }

        public int getOpen_volume() {
            return open_volume;
        }

        public void setOpen_volume(int open_volume) {
            this.open_volume = open_volume;
        }

        public int getClose_volume() {
            return close_volume;
        }

        public void setClose_volume(int close_volume) {
            this.close_volume = close_volume;
        }

        public String getDirection_type() {
            return direction_type;
        }

        public void setDirection_type(String direction_type) {
            this.direction_type = direction_type;
        }

        public double getPosition_cost() {
            return position_cost;
        }

        public void setPosition_cost(double position_cost) {
            this.position_cost = position_cost;
        }

        public int getUnrealized_point() {
            return unrealized_point;
        }

        public void setUnrealized_point(int unrealized_point) {
            this.unrealized_point = unrealized_point;
        }

        public double getCommission() {
            return commission;
        }

        public void setCommission(double commission) {
            this.commission = commission;
        }

        public int getToday_position() {
            return today_position;
        }

        public void setToday_position(int today_position) {
            this.today_position = today_position;
        }

        public int getYd_position() {
            return yd_position;
        }

        public void setYd_position(int yd_position) {
            this.yd_position = yd_position;
        }

        public double getOpen_cost() {
            return open_cost;
        }

        public void setOpen_cost(double open_cost) {
            this.open_cost = open_cost;
        }

        public double getMargin() {
            return margin;
        }

        public void setMargin(double margin) {
            this.margin = margin;
        }
    }
}
